Instead of considering a GValue containing a NULL string to be a
programmer error, simply return NULL.
remove_mnemonics() is in fact called on the value of the
"choice-label" property as well, which has NULL as its default
value.
This prevents triggering the following gnome-shell warning:
gnome-shell[1082]: remove_mnemonics: assertion 'label != NULL' failed
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/555
g_return_val_if_fail (G_VALUE_HOLDS_STRING (value), NULL);
label = g_value_get_string (value);
- g_return_val_if_fail (label != NULL, NULL);
+ if (!label)
+ return NULL;
/* Stripped label will have the original label length at most */
stripped_label = temp = g_new (gchar, strlen(label) + 1);